<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>统一认证 - 登录</title>
    <link href="../static/favicon.ico" rel="shortcut icon" th:href="@{/favicon.ico}"/>
    <link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}"/>
    <link href="../static/assets/css/signIn.css" rel="stylesheet" th:href="@{/assets/css/signIn.css}"/>
</head>
<body>
<div class="container">
    <form class="form-signIn w-100 m-auto" method="post" th:action="@{/authentication/login}">
        <div th:if="${param.error}" class="alert alert-danger" role="alert">
            用户名或密码无效.
        </div>
        <div th:if="${param.logout}" class="alert alert-success" role="alert">
            您已退出.
        </div>
        <h1 class="h3 mb-3 fw-normal">请登录</h1>
        <div class="form-floating">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" class="form-control" required autofocus>
        </div>
        <div class="form-floating">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" class="form-control" required>
        </div>
        <div>
            <button class="w-100 btn btn-lg btn-primary btn-block" type="submit">登录</button>
            <a class="w-100 btn btn-light btn-block bg-white" href="/oauth2/authorization/google-idp" role="link" style="margin-top: 10px">
                <img src="/assets/img/google.png" th:src="@{/assets/img/google.png}" width="20" style="margin-right: 5px;" alt="使用Google登录">
                使用Google登录
            </a>
            <a class="w-100 btn btn-light btn-block bg-white" href="/oauth2/authorization/github-idp" role="link" style="margin-top: 10px">
                <img src="/assets/img/github.png" th:src="@{/assets/img/github.png}" width="24" style="margin-right: 5px;" alt="使用Github登录">
                使用Github登录
            </a>
        </div>
    </form>
</div>
</body>
</html>